SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtrelevamientopredio
AS
SELECT     dbo.u_f1_00_varios.Id, dbo.u_cui.cui, dbo.u_tp_tipoorgnoedu.descripcion AS TipoOrganizacion, dbo.u_f1_00_varios.ElectDistancia, 
                      dbo.u_f1_00_varios.IdDisponElect, dbo.u_f1_00_varios.AlumPubDistancia, dbo.u_f1_00_varios.IdDisponAlumPub, dbo.u_f1_00_varios.idCueResp, 
                      dbo.u_f1_00_varios.idrtasitJudicial, dbo.u_f1_00_varios.otraSitDominio, dbo.u_f1_00_varios.IdcondTenencia, dbo.u_f1_00_varios.otroPredNoEsc, 
                      dbo.u_f1_00_varios.idTipoPredNoEsc, dbo.u_f1_00_varios.nombrePredNoEsc, dbo.u_f1_00_varios.idRespFuncEdificNoEsc, 
                      dbo.u_f1_00_varios.[2_IdDisponElectDiscont] AS IdDisponElectDiscont, dbo.u_f1_00_varios.[2_IdDisponGasNat] AS IdDisponGasNat, 
                      dbo.u_f1_00_varios.[2_GasNatDistancia] AS GasNatDistancia, dbo.u_f1_00_varios.[2_IdDisponAguaCorr] AS IdDisponAguaCorr, 
                      dbo.u_f1_00_varios.[2_AguaCorrDistancia] AS AguaCorrDistancia, dbo.u_f1_00_varios.[2_IdDisponRedCloac] AS IdDisponRedCloac, 
                      dbo.u_f1_00_varios.[2_RedCloacDistancia] AS RedCloacDistancia, dbo.u_f1_00_varios.[2_IdDisponPlantTrat] AS IdDisponPlantTrat, 
                      dbo.u_f1_00_varios.[2_IdDisponRecolRes] AS IdDisponRecolRes, dbo.u_f1_00_varios.[2_RecolResDistancia] AS RecolResDistancia, 
                      dbo.u_f1_00_varios.[3_IdDisponPavim] AS IdDisponPavim, dbo.u_f1_00_varios.[3_PavimDistancia] AS PavimDistancia, 
                      dbo.u_f1_00_varios.[3_IdDisponTransPub] AS IdDisponTransPub, dbo.u_f1_00_varios.[2_IdDisponDesPluv] AS IdDisponDesPluv, 
                      dbo.u_f1_00_varios.[2_DesPluvDistancia] AS DesPluvDistancia, dbo.u_f1_00_varios.[3_TransPubDistancia] AS TransPubDistancia, 
                      dbo.u_f1_00_varios.[3_IdDisponFrecTransp] AS IdDisponFrecTransp, dbo.u_f1_00_varios.[3_IdDisponCorrPost] AS IdDisponCorrPost, 
                      dbo.u_f1_00_varios.[3_CorrPostDistancia] AS CorrPostDistancia, dbo.u_f1_00_varios.[3_IdDisponTelefCable] AS IdDisponTelefCable, 
                      dbo.u_f1_00_varios.[3_TelefCableDistancia] AS TelefCableDistancia, dbo.u_f1_00_varios.[3_IdDisponTelefCelu] AS IdDisponTelefCelu, 
                      dbo.u_f1_00_varios.[3_TelefCeluDistancia] AS TelefCeluDistancia, dbo.u_f1_00_varios.[3_IdDisponAccesInter] AS IdDisponAccesInter, 
                      dbo.u_f1_00_varios.[3_AccesInterDistancia] AS AccesInterDistancia, dbo.u_f1_00_varios.[3_IdDisponRadioAm] AS IdDisponRadioAm, 
                      dbo.u_f1_00_varios.[3_RadioAmDistancia] AS RadioAmDistancia, dbo.u_f1_00_varios.[3_IdDisponRadioFm] AS IdDisponRadioFm, 
                      dbo.u_f1_00_varios.[3_RadioFmDistancia] AS RadioFmDistancia, dbo.u_f1_00_varios.[3_IdDisponRadUHFVHF] AS IdDisponRadUHFVHF, 
                      dbo.u_f1_00_varios.[3_RadUHFVHFDistancia] AS RadUHFVHFDistancia, dbo.u_f1_00_varios.[3_IdDisponTvAire] AS IdDisponTvAire, 
                      dbo.u_f1_00_varios.[3_TvAireDistancia] AS TvAireDistancia, dbo.u_f1_00_varios.[3_IdDisponTvCable] AS IdDisponTvCable, 
                      dbo.u_f1_00_varios.[3_TvCableDistancia] AS TvCableDistancia, dbo.u_f1_00_varios.[4_IdDisponSegPub] AS IdDisponSegPub, 
                      dbo.u_f1_00_varios.[4_SegPubDistancia] AS SegPubDistancia, dbo.u_f1_00_varios.[4_IdDisponHospCenSal] AS IdDisponHospCenSal, 
                      dbo.u_f1_00_varios.[4_HospCenSalDistancia] AS HospCenSalDistancia, dbo.u_f1_00_varios.[4_IdDisponEsparCult] AS IdDisponEsparCult, 
                      dbo.u_f1_00_varios.[4_EsparCultDistancia] AS EsparCultDistancia, dbo.u_f1_00_varios.[4_IdDisponExpComb] AS IdDisponExpComb, 
                      dbo.u_f1_00_varios.[4_ExpCombDistancia] AS ExpCombDistancia, dbo.u_f1_00_varios.[5_IdRespBasural] AS IdRespBasural, 
                      dbo.u_f1_00_varios.[5_IdRespMatader] AS IdRespMatader, dbo.u_f1_00_varios.[5_IdRespDeposExplos] AS IdRespDeposExplos, 
                      dbo.u_f1_00_varios.[5_IdRespFocoCont] AS IdRespFocoCont, dbo.u_f1_00_varios.[5_IdRespTendAltaTens] AS IdRespTendAltaTens, 
                      dbo.u_f1_00_varios.[5_IdRespAeropRuidIntens] AS IdRespAeropRuidIntens, dbo.u_f1_00_varios.[5_IdRespInfVolcan] AS IdRespInfVolcan, 
                      dbo.u_f1_00_varios.[5_IdRespAutRutTrans] AS IdRespAutRutTrans, dbo.u_f1_00_varios.[5_IdRespAutRutTransMitigac] AS IdRespAutRutTransMitigac, 
                      dbo.u_f1_00_varios.[5_IdRespNapasCont] AS IdRespNapasCont, dbo.u_f1_00_varios.[5_IdRespNapasContMitigac] AS IdRespNapasContMitigac, 
                      dbo.u_f1_00_varios.[5_IdRespZonaInud] AS IdRespZonaInud, dbo.u_f1_00_varios.[5_IdRespZonaInudMitigac] AS IdRespZonaInudMitigac, 
                      dbo.u_f1_00_varios.[5_IdRespAludDerrumb] AS IdRespAludDerrumb, 
                      dbo.u_f1_00_varios.[5_IdRespAludDerrumbMitigac] AS IdRespAludDerrumbMitigac, dbo.u_f1_00_varios.[5_IdRespZonaSism] AS IdRespZonaSism, 
                      dbo.u_f1_00_varios.[5_IdRespZonaSismMitigac] AS IdRespZonaSismMitigac, dbo.u_f1_00_varios.[5_IdRespOtroFactor] AS IdRespOtroFactor, 
                      dbo.u_f1_00_varios.[5_IdRespOtroFactorMitigac] AS IdRespOtroFactorMitigac, dbo.u_f1_00_varios.[5_OtroIndique] AS OtroIndique, 
                      dbo.u_f1_00_varios.observaciones
FROM         dbo.u_f1_00_varios INNER JOIN
                      dbo.u_cui ON dbo.u_f1_00_varios.Id = dbo.u_cui.Id LEFT OUTER JOIN
                      dbo.u_tp_tipoorgnoedu ON dbo.u_f1_00_varios.idTipoPredNoEsc = dbo.u_tp_tipoorgnoedu.id
GO
GRANT SELECT ON  [dbo].[vwtrelevamientopredio] TO [Cenie]
GO
